package csc.daonjpa.java.domain;

import java.io.Serializable;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;

/**
 * Entity class for Account table. This is a simple POJO class with annotations to define mapping with DB table
 * @author nvu3
 *
 */
@Entity
@Table(name="account")
@PrimaryKeyJoinColumn(name = "accountNumber")
public class Account extends BaseInfor implements Serializable {
	private static final long serialVersionUID = 1L;
	
	@Column(name = "accountName")
	private String accountName;
	
	@Column(name = "accountType")
	private String accountType;
	
	@ManyToOne
	@JoinColumn(name="loginId")
	private Customer customer;

	/**
	 * Required constructor
	 */
	public Account() {
	
	}

	public String getAccountName() {
		return accountName;
	}

	public void setAccountName(String accountName) {
		this.accountName = accountName;
	}

	public String getAccountType() {
		return accountType;
	}

	public void setAccountType(String accountType) {
		this.accountType = accountType;
	}

	public Customer getCustomer() {
		return customer;
	}

	public void setCustomer(Customer customer) {
		this.customer = customer;
	}
	
	
}